<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<button class="toIndex">跳转到index页面</button>
		<button class="backIndex">后退</button>
		<script type="text/javascript">
			var btn1 = document.querySelector(".toIndex")
			btn1.addEventListener("click", function() {
				location.href = "index.html";
			})

			var btn2 = document.querySelector(".backIndex")
			btn2.addEventListener("click", function() {
				// history.back();
				history.go(-1);
			})
		</script>
	</body>
</html>
